// 新的过滤器实现方式，自动注册
export const monthlyCategoryFilter = (val) => {
    if (val === 1) {
        return "平台";
    }
    if (val === 2) {
        return "运营商";
    }
    if (val === 3) {
        return "站点";
    }
}

export const getDayByMonth = (year, month) => {
    var day = 0;
    month = parseInt(month);
    year = parseInt(year);
    switch (month) {
        case 1:
        case 5:
        case 7:
        case 8:
        case 10:
        case 12:
        case 3: 
            day = 31;
            break;
        case 4:
        case 6:
        case 9:
        case 11:
            day = 30;
             break;
        case 2:
            if (year % 4 == 0 && year % 100 != 0 || year % 400 == 0) {
                day = 29;
            } else {
                day = 28;
            }
            break

    }
    return day;
}